<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>未租出房信息</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/static/css/dashboard.css}" rel="stylesheet">
</head>

<body>

<div class="container-fluid">
    <div class="row">

        <main role="main" class="col-md-9 col-lg-10 pt-3 px-4">
            <h2><a class="btn btn-sm btn-success" th:href="@{/rent/house/addHouse}">发布房源</a></h2>
            <h2>我未租出的房源</h2>
            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>房源描述</th>
                        <th>出租方式</th>
                        <th>房屋面积</th>
                        <th>房屋价格</th>
                        <th>房屋地址</th>
                        <th>联系电话</th>
                        <th>发布者</th>
                        <th>发布日期</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tr th:each="house:${houses}">
                        <td th:text="${house.getHouseDesc()}"></td>
                        <td th:text="${house.getHouseType()}"></td>
                        <td th:text="${house.getHouseArea()}"></td>
                        <td th:text="${house.getHousePrice()}"></td>
                        <td th:text="${house.getHouseAddress()}"></td>
                        <td th:text="${house.getHouseTel()}"></td>
                        <td th:text="${house.getPublisher()}"></td>
                        <td th:text="${#dates.format(house.getCreateTime(),'yyyy-MM-dd')}"></td>
                        <td>
                            <a class="btn btn-sm btn-primary" th:href="@{/rent/house/toUpdateHouse/{id}(id=${house.getHouseId()})}">编辑</a>
                            <a class="btn btn-sm btn-primary" th:href="@{deleteHouse/{id}(id=${house.getHouseId()})}">删除</a>
                        </td>
                    </tr>
                </table>
            </div>
        </main>
    </div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="/static/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="/static/js/popper.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>

<!-- Icons -->
<script type="text/javascript" src="/static/js/feather.min.js"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script type="text/javascript" src="/static/js/Chart.min.js"></script>

</body>

</html>
